﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace MetaHeuristics.Collections
{
    /// <summary>
    /// A generic symmetric 2D matrix.
    /// </summary>
    public class SymmetricMatrix<T> : Matrix<T>
    {
        public SymmetricMatrix(int rowCount, T value)
            :base(rowCount,rowCount,value)
        {}

        public override T this[int i, int j]
        {
            get
            {
                return base[i, j];
            }
            set
            {
                base[i, j] = value;
                base[j, i] = value;
            }
        }
    }
}
